package com.cosina.game.crystallight.ui.mapselect;

import android.content.Context;
import android.graphics.Canvas;
import android.view.View;
import android.widget.FrameLayout.LayoutParams;

import com.cosina.game.crystallight.model.profile.ProfileManager;
import com.cosina.game.crystallight.ui.ResourceManager;
import com.cosina.game.crystallight.ui.common.PaintSuite;
import com.cosina.game.crystallight.util.CanvasUtil;

public class StatsUpPart extends View {
	
	
	final int titleHeight =  147;
	public StatsUpPart(Context context) {
		super(context);
		this.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, UpAndDownLayout.UP_HEIGHT));
	}
	@Override
	protected void onDraw(Canvas canvas) {
		canvas.drawBitmap(ResourceManager.get("img/map/map_title.jpg"), 0,0,PaintSuite.p4Simple);
		canvas.drawBitmap(ResourceManager.get("img/map/statsinfo.jpg"), 0,147,PaintSuite.p4Simple);
		
		int[] datas = ProfileManager.getCurrentProfile().stats.data;
		for(int i=0; i<datas.length; i++ ){
			CanvasUtil.drawText(canvas, datas[i], 251, 139 +40 + 36*i, PaintSuite.p4Text, 18);
		}
	}
}
